package dk.druidPro.dao.impl;

import org.springframework.stereotype.Repository;

import dk.druidPro.dao.UserDaoI;
import dk.druidPro.model.Tuser;
import dk.druidPro.pageModel.PageUtil;

@Repository
public class UserDaoImpl extends BaseDaoImpl<Tuser> implements UserDaoI {

	public Tuser login(Tuser user) {
		PageUtil pageUtil=new PageUtil(1,20);
		pageUtil=this.queryPageList(user, pageUtil);
		int n=this.queryCount(user);
		if(n==0) return null;
		else{
			return (Tuser) pageUtil.getList().get(0);
		}
	}

}
